home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_300
/
352_01
/
filesize.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1990-07-23
|
267b
|
17 lines
/* FILESIZE.C - get and return filesize.
*/
#include <stdlib.h>
#include <sys\stat.h>
long filesize ( char *spec )
{
long l;
struct stat st;
l = stat ( spec, &st );
if ( l != -1 )
{
l = st.st_size;
}
return (l); /* filesize () */
}